<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ page isELIgnored="false" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title><s:text name="user.title.searchUser"/></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    
    <s:form action="/searchUser.action">
    	<tr>
    		<td width="55%" colspan="2"> Username </td>
    		<td width="45%"> <s:textfield name="userStr" ></s:textfield> </td>
    	</tr>
    	<tr>
    		<td width="100%" colspan="3"> <s:submit value="Search" /> </td>
    	</tr>
    	<tr>
    		<td width="100%" colspan="3"> <a href="<%=request.getContextPath() %>/createUser.action" >New</a> </td>
    	</tr>
    	<tr>
    		<td width="10%"> Sr.No. </td>
    		<td width="45%"> User Name </td>
    		<td width="45%"> Password </td>
    	</tr>
 		<s:iterator id="user" value="users" >
 			<tr>
	    		<td width="10%"> 1 </td>
	    		<td width="45%"> <s:property value="username" /> </td>
	    		<td width="45%"> <s:property value="password" /> </td>
	    	</tr>
 		</s:iterator>
 		
 		<%--c-rt:forEach items="${requestScope.users}" varStatus="srno" var="user">
 			<tr>
	    		<td width="5%"> ${srno.index} </td>
	    		<td width="45%"> ${user.userName} </td>
	    		<td width="50%"> ${user.password} </td>
	    	</tr>
 		</c-rt:forEach--%>
 		
   </s:form>
   ${requestScope.users}
    <%--display:table name="${requestScope.users}" uid="table1" sort="external" id="displayTagID" pagesize="10" partialList="true" size="20" excludedParams="*" >
    	<display:column title="User" escapeXml="true" sortable="false"  >${displayTagID.username}</display:column>
    	<display:column title="Password" escapeXml="true" sortable="true" sortName="${requestScope.users}" headerClass="sortable" >${displayTagID.password}</display:column>
    </display:table--%> 
     
  </body>
</html>
